package com.csun.cmny.provider.model.domain;

import com.csun.cmny.core.mybatis.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.ibatis.type.Alias;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

@Data
@Alias(value = "dmcPhoneEvent")
@Table(name = "cn_dmc_phone_event")
public class DmcPhoneEvent implements Serializable {

    private static final long serialVersionUID = -2574535143195231871L;

    /**
     * id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    /**
     * 版本号
     */
    private Integer version;

    /**
     * 设备编号
     */
    @Column(name = "device_id")
    private Long deviceId;

    /**
     * 电话机事件编码
     */
    @Column(name = "event_code")
    private String eventCode;

    /**
     * 电话机事件消息
     */
    @Column(name = "event_msg")
    private String eventMsg;

    /**
     * 创建时间
     */
    @Column(name = "event_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date eventTime;

    /**
     * 电话机事件消息
     */
    @Column(name = "`operator`")
    private Integer operator;

    /**
     * 电话机事件消息
     */
    @Column(name = "zone_no")
    private String zoneNo;

    /**
     * 创建时间
     */
    @Column(name = "created_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdTime;

    /**
     * 更新时间
     */
    @Column(name = "update_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

}